import Cookies from "js-cookie";

const TokenKey = "xxz_token";
const NameKey = "xxz_name";
const MerchantIdKey = "xxz_merchant_id";
const PhotoKey = "xxz_avatar";
const AccountKey = "xxz_account";

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

export function getName() {
  return Cookies.get(NameKey);
}

export function setName(name) {
  return Cookies.set(NameKey, name);
}

export function removeName() {
  return Cookies.remove(NameKey);
}

export function getMerchantId() {
  return Cookies.get(MerchantIdKey);
}

export function setMerchantId(id) {
  return Cookies.set(MerchantIdKey, id);
}

export function removeMerchantId() {
  return Cookies.remove(MerchantIdKey);
}

export function getPhoto() {
  return Cookies.get(PhotoKey);
}

export function setPhoto(url) {
  return Cookies.set(PhotoKey, url);
}

export function removePhoto() {
  return Cookies.remove(PhotoKey);
}

export function getAccount() {
  return Cookies.get(AccountKey);
}

export function setAccount(no) {
  return Cookies.set(AccountKey, no);
}

export function removeAccount() {
  return Cookies.remove(AccountKey);
}
